package com.msb.di;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author sunpeng
 * @Date 2021-07-15 17:51
 */
@Configuration(proxyBeanMethods = false)
public class DIConfig {
    @Bean
    public Address getAddress(){
        return new Address();
    }
    @Bean(value = "student")
    public Student getStudent(Address address){
        return new Student(address);
    }
}
